--TEST--
bool MySQLndUhConnection::sslSet(resource $connection)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
	require_once('config.inc');

	class proxy extends MySQLndUhConnection {
		public function sslSet($conn, $key, $cert, $ca, $capth, $cipher) {
			printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
			return parent::sslSet($conn, $key, $cert, $ca, $capth, $cipher);
		}
	}

	class proxy2 extends MySQLndUhConnection {
		public function sslSet($conn, $key, $cert, $ca, $capth, $cipher) {
			return $conn;
		}
	}

	class proxy3 extends MySQLndUhConnection {
		public function sslSet($conn, $key, $cert, $ca, $capth, $cipher) {}
	}

	$conn = mysqlnd_uh_test\connect::mysqli();
	mysqlnd_uh_test\query_test::mysqli($conn);

	mysqlnd_uh_set_connection_proxy(new proxy());
	mysqlnd_uh_test\query_test::mysqli($conn);
	$conn->ssl_set("key", "cert", "ca", "capath", "cipher");

	mysqlnd_uh_set_connection_proxy(new proxy2());
	$conn = mysqlnd_uh_test\connect::mysqli();
	$conn->ssl_set("key", "cert", "ca", "capath", "cipher");

	mysqlnd_uh_set_connection_proxy(new proxy3());
	$conn = mysqlnd_uh_test\connect::mysqli();
	$conn->ssl_set("key", "cert", "ca", "capath", "cipher");

	print "done!";
?>
--EXPECTF--
proxy::sslSet(array (
  0 => NULL,
  1 => 'key',
  2 => 'cert',
  3 => 'ca',
  4 => 'capath',
  5 => 'cipher',
))
done!
